﻿@{
    ViewBag.Title = (Model.Id > 0 ? "修改" : "添加") + "自定义页面";
    Layout = "~/Areas/Admin/Views/Shared/_RightLayout.cshtml";
}
<script src="@Url.Content("~/scripts/ckeditor/ckeditor.js")" type="text/javascript"></script>
<script src="@Url.Content("~/scripts/ckfinder/ckfinder.js")" type="text/javascript"></script>
<script>
    function ckeditor(textArea) {
        CKEDITOR.replace(textArea,
                                                        {
                                                            toolbar:
            [
               ['Source', '-', 'Save', 'NewPage', 'Preview', '-', 'Templates'],
        ['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Print', 'SpellChecker', 'Scayt'],
        ['Undo', 'Redo', '-', 'Find', 'Replace', '-', 'SelectAll', 'RemoveFormat'],
        ['Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField'],
        '/',
        ['Bold', 'Italic', 'Underline', 'Strike', '-', 'Subscript', 'Superscript'],
        ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', 'Blockquote', 'CreateDiv'],
        ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
        ['Link', 'Unlink', 'Anchor'],
        ['Image', 'Flash', 'Table', 'HorizontalRule', 'Smiley', 'SpecialChar', 'PageBreak'],
        '/',
        ['Styles', 'Format', 'Font', 'FontSize'],
        ['TextColor', 'BGColor'],
        ['Maximize', 'ShowBlocks', '-', 'About']

            ],
                                                                skin: 'office2003',
                                                                height: 400,
                                                                scayt_autoStartup: false,
                                                                filebrowserBrowseUrl: '/scripts/ckfinder/ckfinder.html',
                                                                filebrowserImageBrowseUrl: '/scripts/ckfinder/ckfinder.html?Type=Images',
                                                                filebrowserFlashBrowseUrl: '/scripts/ckfinder/ckfinder.html?Type=Flash',
                                                                filebrowserUploadUrl: '/scripts/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files',
                                                                filebrowserImageUploadUrl: '/scripts/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images',
                                                                filebrowserFlashUploadUrl: '/scripts/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Flash'
                                                            });
    }

    function injectCkeditor() {
        ckeditor('Content_Zh_cn');
        ckeditor('Content_Zh_tw');
        ckeditor('Content_En_us');
    }

    $(document).ready(function () { injectCkeditor(); });
</script>
	<form id="editForm" name="editForm" method="post" action="/Admin/Custompage/Save/@if(Model.Id > 0){ Write(Model.Id.ToString()); }">
	<div id="panelBar">
		<ul class="toolBar">
			<li><input class="submit" type="submit" value="保存" /></li>
			<li><a class="back" href="javascript:void(0)"><span>返回</span></a></li>
		</ul>
	</div>
	<div id="edit">
		<ul>
            <li> 
				<span class="label">Url：</span>
                <span class="required">
                    <input id="Url" name="Url" type="text" value="@Model.Url" required="required" title="请输入" /> 
                </span>
			</li> 
            <li> 
				<span class="label">描述：</span>
                <span >
                    <input id="Description" name="Description" type="text" value="@Model.Description"  title="请输入" /> 
                </span>
			</li> 
            <li> 
				<span class="label">内容(简体中文)：</span>
                <span class="required">
                    <textarea id="Content_Zh_cn" name="Content_Zh_cn" required="required" alt="请输入Content_Zh_cn">@Model.Content_Zh_cn</textarea>
                </span>
			</li> 
            <li> 
				<span class="label">内容(繁体中文)：</span>
                <span class="required">
                    <textarea id="Content_Zh_tw" name="Content_Zh_tw" required="required" alt="请输入Content_Zh_tw">@Model.Content_Zh_tw</textarea>
                </span>
			</li> 
            <li> 
				<span class="label">内容(英文)：</span>
                <span class="required">
                    <textarea id="Content_En_us" name="Content_En_us" required="required" alt="请输入Content_En_us">@Model.Content_En_us</textarea>
                </span>
			</li> 
		</ul>
	</div>
	</form>
